package com.atbeijing.udf;

import org.apache.hadoop.hive.ql.exec.UDF;

/**
 * 将参数转为小写
 */
public class LowerUDF extends UDF {

    public String evaluate (final String str) {

        if (str == null) {
            return null;
        }else if("".equals(str)){
            return "";
        }else {
            return str.toLowerCase();
        }
    }
}
